package com.heima.home.mapper;
import com.heima.home.entity.Properties;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PropertyMapper {

    // 注意：这里的SQL不需要写 LIMIT 或 ORDER BY，PageHelper会自动添加
    @Select("SELECT * FROM properties WHERE status = 1")
    List<Properties> findAllActive();

    @Select("SELECT * FROM properties WHERE id = #{id}")
    Properties selectById(Long id);
}